var bracketServices = angular.module('bracketServices', ['ngResource']);

bracketServices.factory('userServer', ['$resource',
    function($resource){
        return $resource('user.json', {}, {
            query: {method:'GET', params:{userid:'110'}, isArray:true}
            //'get':    {method:'GET'},
            //'save':   {method:'POST'},
            //'query':  {method:'GET', isArray:true},
            //'remove': {method:'DELETE'},
            //'delete': {method:'DELETE'}
        });
    }]);

//bracketServices.factory('getData', ['$http',
//    function($http){
//        $http({method : 'POST', params : { id:123}, data:{name:'john',age:27}, url : "/mypath"})
//            .success(function(response, status, headers, config){
//                //do anything what you want;
//            })
//            .error(function(response, status, headers, config){
//                //do  anything what you want;
//            });
//        return data;
//    }
//]);